# src/pojo/kno_type.py
from database.database import db


class KnoType(db.Model):
    __tablename__ = 'kno_type'

    id = db.Column(db.Integer, primary_key=True)
    knokinds_id = db.Column(db.String(255), nullable=False)
    kno_type = db.Column(db.String(255), nullable=False)

    def __init__(self, knokinds_id, kno_type):
        self.knokinds_id = knokinds_id
        self.kno_type = kno_type

    def to_dict(self):
        return {
            'id': self.id,
            'knokinds_id': self.knokinds_id,
            'kno_type': self.kno_type
        }
